<template>
  <yd-ls-layout title="下载APP" :onfoot=false >
    <div class="yd-ls-height"></div>
    <div class="yd-ls-scan-download">
      <div class="yd-ls-about-img">
        <img src="http://pay.6ewei.com/img/login_logo.png" width="80%" height="80%" alt="" />
      </div>
      <p>{{comName}}医生版</p>
    </div>
    <div class="yd-ls-scan-download-footer">
      <yd-button bgcolor="#4870f3" color="#ffffff" 
      style="border-radius: 8px;width: 50%;" 
      @click.native="download">立即下载</yd-button>
      <p>温馨提示：下载应用后直接使用手机号登录完成信息填写即可使用诸多功能</p>
    </div>
  </yd-ls-layout>
</template>

<style>
.yd-ls-scan-download {
  width: 100%;
  overflow: hidden;
  text-align: center;
  padding: 1rem 0.2rem;
  background-color: rgb(72, 112, 243);
}
.yd-ls-scan-download .yd-ls-about-img {
  display: inline-block;
  width: 1.14rem;
  height: 1.14rem;
  line-height: 1.14rem;
  overflow: hidden;
  background-color: #fff;
  border-radius: 50%;
}
.yd-ls-scan-download .yd-ls-about-img img {
  width: 80%;
  height: 80%;
  vertical-align: middle;
}
.yd-ls-scan-download p {
  margin-top: 0.1rem;
  font-size: 0.28rem;
  line-height: 0.64rem;
  color: #fff;
}

.yd-ls-scan-download-footer {
  position: absolute;
  bottom: 0;
  left: 0;
	overflow: hidden;
	text-align: center;
	padding: 0.34rem;
}
.yd-ls-scan-download-footer button.yd-btn{
	font-size: 0.4rem;
	padding: 0.12rem 0.34rem;
	margin-bottom: 0.72rem;
}
.yd-ls-scan-download-footer p{
	font-size: 0.3rem;
	line-height: 0.48rem;
}
</style>
<script>
  import ydLsLayout from '../../components/yd-ls-layout.vue'
  import ydLsButton from "../../components/yd-ls-button.vue"
  import api from '../../axios/api'

  export default {
    name: 'scanReg',
    data() {
      return {
        comName: api.default_title,
        android: api.app_android,
        ios: api.app_ios
      }
    },
    created() {
      //TODO:初始化数据
    },
    methods: {
      download() {
        var u = navigator.userAgent;
        if ( u.indexOf('Android') > -1 || u.indexOf('Adr') > -1 ){
          window.location.href = this.android;
        }else{
          window.location.href = this.ios;
        }
      }
    },
    mounted() {
    },
    components: { ydLsLayout, ydLsButton }


  }
</script>
